#include<stdio.h>
//#include<string.h>
int main()
{
	char arr1[10];
	char arr2[10];
	scanf_s("%s", arr1, sizeof(arr1));
	scanf_s("%s", arr2, sizeof(arr2));
	int i = 0;
	for ( i = 0; i < sizeof(arr1); i++)
	{
		int a;
		a = arr1[i];
		arr1[i] = arr2[i];
		arr2[i] = a;

	}
	printf("%s\n", arr1);
	printf("%s", arr2);
	return 0;
}